﻿<%@ Page Title="Afhent reservation" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Reservation.aspx.cs" Inherits="cinetoona.Reservation" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">

</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">        
    <div id="ResWrap">
        <h2>
<%--            <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
                ContextTypeName="cinetoona.DataAccessDataContext" EnableDelete="True" 
                EnableInsert="True" EnableUpdate="True" EntityTypeName="" TableName="Bookings">
            </asp:LinqDataSource>--%>
            Afhent reservation:</h2>
        <asp:Label ID="getreservationLabel" runat="server" Text="Reservationsnummer:"></asp:Label>
        <br />
        <asp:TextBox ID="reservationnumber" runat="server" Width="258px"></asp:TextBox>
        <br />
        <asp:Button ID="getReservation" runat="server" Text="Find" 
             onclick="getReservation_Click" Width="272px" />
             &nbsp;&nbsp;
        <asp:Button ID="print" runat="server" onclick="print_Click" Text="To PDF" />
             <br />
        <asp:GridView ID="ReservationGridView" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" CellPadding="4"
            ForeColor="#333333" GridLines="None" EmptyDataText="No records.">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:BoundField DataField="Name" HeaderText="Navn" ReadOnly="True" 
                    SortExpression="Name" />
                <asp:BoundField DataField="Phone" HeaderText="Tlf. nr." ReadOnly="True" 
                    SortExpression="Phone" />
                <asp:BoundField DataField="Title" HeaderText="Film" ReadOnly="True" 
                    SortExpression="Film" />
                <asp:BoundField DataField="Quantity" HeaderText="Antal" ReadOnly="True" 
                    SortExpression="Quantity" />
                <asp:CheckBoxField DataField="Payed" HeaderText="Betalt" ReadOnly="True" 
                    SortExpression="Paid" />
                <asp:CommandField ShowSelectButton="true" ShowDeleteButton="True" ShowEditButton="true" />                
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
       <%-- <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AllowSorting="True" DataSourceID="LinqDataSource1" 
            AutoGenerateColumns="False">
            <Columns>
                <asp:BoundField DataField="Name" HeaderText="Navn" SortExpression="Name" />
                <asp:BoundField DataField="Phone" HeaderText="Tlf. nr." 
                    SortExpression="Phone" />
                <asp:BoundField DataField="Quantity" HeaderText="Antal" 
                    SortExpression="Quantity" />
                <asp:BoundField DataField="Payed" HeaderText="Betalt" SortExpression="Payed" />
                <asp:BoundField DataField="Movies" HeaderText="Film" 
                    SortExpression="Movies" />
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
            </Columns>
        </asp:GridView>--%>
    </div>
    <div id="CreateBooking">
        <h2>Opret reservation:</h2>
        <asp:Label ID="showLabel" runat="server" Text="Forestilling:"></asp:Label><br />
        <asp:DropDownList ID="ShowDropDownList" runat="server" ViewStateMode="Enabled" AutoPostBack="true"
            onselectedindexchanged="ShowDropDownList_SelectedIndexChanged"></asp:DropDownList><br />
                        
        <asp:Label ID="dateLabel" runat="server" Text="Tidspunkt:"></asp:Label><br />
        <asp:DropDownList ID="DateDropDownList" runat="server" Width="272px"></asp:DropDownList><br />
            
        <asp:Label ID="nameLabel" runat="server" Text="Navn:"></asp:Label><br />
        <asp:TextBox ID="NameTextBox" runat="server" Width="258px" ></asp:TextBox><br />
        
        <asp:Label ID="phoneLabel" runat="server" Text="Tlf. nr.:"></asp:Label><br />
        <asp:TextBox ID="PhoneTextBox" runat="server" Width="258px"></asp:TextBox><br />

        <asp:Label ID="quantityLabel" runat="server" Text="Antal billetter:"></asp:Label><br />
        <asp:TextBox ID="QuantityTextBox" runat="server" Width="258px"></asp:TextBox><br />
            
        <asp:Button ID="BookButton" runat="server" Text="Book" Width="272px" 
            onclick="BookButton_Click" />
    </div>
</asp:Content>